#!/bin/bash

# Method of use

# zabbix_agent.conf
# UserParameter=mysql.status[*],mysql -h localhost  -uzabbix -pzabbix -P 3006 -e "show global status" 2>/dev/null | grep "^$1\>"| awk '{print $NF}'

# mysql
# GRANT PROCESS ON *.* TO 'zabbix'@'localhost' identified BY 'zabbix';
# Flush privileges;